<template>
	<div class="pub">
		<div class="navigation">
			<van-nav-bar title="发布" />
			<input type="text" placeholder="请输入标题" class="one">
			<textarea name="" id="" cols="30" rows="10" placeholder="请输入内容" class="two"></textarea>
		</div>

		<van-uploader :after-read="afterRead" />

		<div class="qd">
			<van-button type="primary" size="large">确定</van-button>
		</div>
		<div class="di">
			<van-tabbar v-model="active">
				<van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
				<van-tabbar-item icon="add-o" to="/publish">发布</van-tabbar-item>
				<van-tabbar-item icon="manager-o" to="myview">我的</van-tabbar-item>
			</van-tabbar>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				active: 1
			}
		},
		methods: {
			afterRead(file) {
				// 此时可以自行将文件上传至服务器
				console.log(file);
			}
		}
	}
</script>

<style>
	.one {
		width: 98%;
		height: 40px;
		margin-top: 10px;
		border: none;
		margin-left: 10px;
		font-size: 13px;
	}

	.two {
		width: 98%;
		height: 100px;
		margin-top: 10px;
		border: none;
		margin-left: 10px;
		font-size: 13px;
	}

	.pub {
		background-color: #fafafa;
	}

	.qd {
		width: 300px;
		margin-left: 40px;
	}
	
</style>
